<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>我的购物车</title>
    <link rel="stylesheet" href="/css/modules/reset.css">
    <link rel="stylesheet" href="/css/modules/header.css">
    <link rel="stylesheet" href="/css/modules/footer.css">
    <link rel="stylesheet" href="/css/shopcart.css">
    <link rel="shortcut icon" href="/img/favicon.png">
    <link rel="stylesheet" href="/libs/bootstrap/css/bootstrap.min.css">
</head>
<body>
    <header></header>
    <main>
        <div class="main">
            <div class="goods-list">
                <table class="table">
                    <thead>
                            <tr>
                                <th><input type="checkbox" id="allCheck" >全选</th>
                                <th>商品名称</th>
                                <th>单价</th>
                                <th>数量</th>
                                <th>小计</th>
                                <th>操作</th>
                            </tr>
                    </thead>
                    <tbody id="shop-tbody">
                            <!-- <tr>
                                <td><input type="checkbox"></td>
                                <td class="num-name"><img src="/img/list4.jpg" alt=""> 海鸥商务休闲日历自动机械男表819.12.5111  白色  </td>
                                <td class="num-price"> 689.00元 </td>
                                <td>
                                    <div class="num-td">
                                        <a href="#">-</a>
                                        <input type="text" value="1">
                                        <a href="#">+</a>
                                    </div>
                                </td>
                                <td class="num-cont">689.00元</td>
                                <td><a class="del">x</a></td>
                            </tr> -->
                            <script type="text/html" id="shopTobyTemplate">
                            {{each cart shop}}
                            <tr data-id="{{shop.id}}">
                                <td><input type="checkbox" class="checks" id="checks" {{shop.check ? 'checked':''}}></td>
                                <td class="num-name"><a href="/html/details.html?id={{shop.id}}"><img src="{{shop.photo[0].url}}" alt=""></a> {{shop.title}}  </td>
                                <td class="num-price"> {{shop.price}}元 </td>
                                <td>
                                    <div class="num-td">
                                        <a href="javascript:;" class="shopdel">-</a>
                                        <input type="text" class="numvalu" value="{{shop.count}}">
                                        <a href="javascript:;" class="shopadd">+</a>
                                    </div>
                                </td>
                                <td class="num-cont">{{(shop.count*shop.price).toFixed(2)}}元</td>
                                <td><a class="del">x</a></td>
                            </tr>
                            {{/each}}
                            </script>
                    </tbody>
                </table>
            </div>
            <div class="goods-price">
                <p>合计（不含运费）<span id="payMoney">0</span>元 <a href="javascript:;">去结算</a></p>
            </div>
            <div class="empty" id="cart-empty">
                <div class="empty-cart">
                    <h3>您的购物车还是空的！</h3>
                    <a href="/index.html">马上去购物</a>
                </div>
            </div>
        </div>
    </main>
    <footer></footer>
    <script src="/libs/require/require.min.js" data-main="/js/shopcart"></script>
</body>
</html>